<div class="container">
	<?php if(isset($dados['erro'])) { ?>
		<div class="alert alert-warning alert-dismissible" role="alert">
			<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
			<strong>Ops!</strong>Tem um problema com seu cadastro! Verifique as informações abaixo!
			<?php print_r($dados['erro']); ?>
		</div>
	<?php } ?>
	<div class="col-md-12">
	<h1>Cadastrar novo anúncio</h1>
		<form action="<?php echo URL; ?>promocoes/promocao_processa" class="form-horizontal" method="POST" enctype="multipart/form-data">
			<div class="form-group">
				<label class="control-label col-sm-2 col-xs-12" for="nome">Nome:</label>
				<div class="col-sm-8 col-xs-12">
			        <input <?php if(isset($_SESSION['formulario']['promocao']['nome'])) echo 'value="'.$_SESSION['formulario']['promocao']['nome'].'"'; ?> type="text" name="nome" class="form-control" id="nome" placeholder="">
				</div>
			</div>
			<div class="form-group">
				<label class="control-label col-sm-2 col-xs-12" for="descricao">Descrição:</label>
				<div class="col-sm-8 col-xs-12">
					<input <?php if(isset($_SESSION['formulario']['promocao']['descricao'])) echo 'value="'.$_SESSION['formulario']['promocao']['descricao'].'"'; ?> type="text" name="descricao" class="form-control" id="descricao" placeholder="">
				</div>
			</div>
			<div class="form-group">
				<label class="control-label col-sm-2 col-xs-12" for="preco">Preço:</label>
				<div class="col-sm-3 col-xs-12">
					<input <?php if(isset($_SESSION['formulario']['promocao']['preco'])) echo 'value="'.$_SESSION['formulario']['promocao']['preco'].'"'; ?> type="text" name="preco" class="form-control preco" id="preco" placeholder="">
				</div>
				<label class="control-label col-sm-2 col-xs-12" for="desconto">Desconto:</label>
				<div class="col-sm-3 col-xs-12">

					<p>
					  <input type="text" id="amount" name="desconto" readonly style="border:0" <?php if(isset($_SESSION['formulario']['promocao']['desconto'])) echo 'value="'.$_SESSION['formulario']['promocao']['desconto'].'"'; ?>>
					</p>
					 
					<div id="slider-range-min"></div>


				</div>
			</div>			
			<div class="form-group">
				<label class="control-label col-sm-2 col-xs-12" for="loja">Loja:</label>
				<div class="col-sm-6 col-xs-12">
					<input <?php if(isset($_SESSION['formulario']['promocao']['loja'])) echo 'value="'.$_SESSION['formulario']['promocao']['loja'].'"'; ?>type="text" name="loja" class="form-control" id="loja" placeholder="">
				</div>
			</div>
			<div class="form-group">
				<label class="control-label col-sm-2 col-xs-12" for="periodo">Período (em dias):</label>
				<div class="col-sm-3 col-xs-12">
					<select name="periodo" class="form-control">
						<option value="1">1</option>
						<option value="3">3</option>
						<option value="5">5</option>
						<option value="10">10</option>
					</select>
				</div>
			</div>
			<div class="form-group">
			
				<label class="control-label col-sm-2 col-xs-12" for="foto">Foto:</label>
				<div class="col-sm-6 col-xs-12">
					<input type="file" name="foto" />
				</div>
			</div>
			
			
			<div class="form-group">
				<div class="col-xs-10">
					<input type="submit" class="btn btn-primary" value="Cadastrar" style="float:right">
				</div>
			</div>
		</form>			
		</br>
	</div>
</div>